#define installSelectProjectButton(formModelName)
	<div class="form-group">
	    <label class="col-md-2 control-label">项目名称</label>
	    <div class="col-md-4">
	    	<div class="input-group mar-btm col-md-12">
	    		<input type="hidden"  name="#(formModelName).project_id" id="projectId" class="form-control"  value="#(o?o.project_id:'')">
				<input type="hidden"  name="#(formModelName).project_code" id="projectCode" class="form-control"  value="#(o?o.project_code:'')">
			    <input type="text"  name="#(formModelName).project_name" id="projectName" class="form-control"  value="#(o?o.project_name:projectName)" readonly>
		        
			    #if(view!="detail")
			    	<span class="input-group-btn">
		            	<button class="btn btn-primary" type="button" onclick="openSlectProjecttDialog()">选择</button>
		            </span>
		        #end
		    </div>
	    </div>
	    <script>
	    	function openSlectProjecttDialog(){
	    		layer.open({
					  type: 2,
					  title: false, //不显示标题栏
					  area: ['1000px', '550px'],
					  shade: 0.2,
					  id: 'selectProjectDialog', //设定一个id，防止重复弹出
					  resize: false,
					  closeBtn: false,
					  isOutAnim : false , 
					  btnAlign: 'c',
					  content: ctx+'/admin/oa/project/openSelectOneProjectDialog?orgid=#(orgid)',
					  success: function(layero){
						  
					  }
				});
	    	}
	    	function callBackSelectProject(id,code,name){
	    		$("#projectId").val(id);
				$("#projectCode").val(code);
	    		$("#projectName").val(name);
	    	}
	    </script>
	</div>
#end

